home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / DB / UTIL72 / CATALOG6.SQL < prev    next >
Encoding:
Text File  |  1995-05-09  |  50.1 KB  |  1,458 lines

  1. rem 
  2. rem $Header: catalog6.sql 7020100.1 94/09/23 22:14:48 cli Generic<base> $ 
  3. rem 
  4. Rem Copyright (c) 1990 by Oracle Corporation
  5. Rem NAME
  6. Rem   CATALOG6.SQL
  7. Rem FUNCTION
  8. Rem   Contains V6 views removed from V7 CATALOG.SQL.
  9. Rem   These views are obsolete or have been replaced by better views in V7.
  10. Rem   The accessible_* and constraint_* views were part of the SQL2 spec
  11. Rem   at the time V6 was released, but are no longer part of the spec.
  12. Rem NOTES
  13. Rem   Must be run when connected as SYS after catalog.sql and audit.sql
  14. Rem   have been run.
  15. Rem 
  16. Rem MODIFIED
  17. Rem     gdoherty   04/06/94 -  merge changes from branch 1.10.710.2
  18. Rem     wmaimone   12/17/93 -  merge changes from branch 1.10.710.1
  19. Rem     wmaimone   10/08/93 -  #(176646) change type in tabauth$,colauth$ view
  20. Rem     lfeng      11/25/92 -  remove insert_priv column in col_grants views 
  21. Rem     mmoore     11/04/92 -  add tabauth$ and colauth$ 
  22. Rem     mmoore     06/02/92 - #(96526) remove v$enabledroles 
  23. Rem     mmoore     04/13/92 -  merge changes from branch 1.6.300.1 
  24. Rem     mmoore     03/03/92 -  change view names
  25. Rem     wmaimone   10/26/91 -  add audit views 
  26. Rem     mmoore     08/01/91 -         merge changes from branch 1.4.100.1 
  27. Rem     mmoore     08/01/91 -         move column_privileges back to catalog  
  28. Rem     mmoore     06/28/91 -         take table_privileges out 
  29. Rem     mmoore     06/23/91 -         add security views 
  30. Rem     jwijaya    06/21/91 -         fix DBA_CROSS_REFS
  31. Rem     amendels   06/10/91 - move obsolete sql2 views accessible_* and
  32. Rem                           constraint_* from catalog.sql
  33. Rem   Wijaya     01/04/91 - Creation
  34. Rem
  35.  
  36. remark
  37. remark  This view shows all tables and views owned by the
  38. remark  user, plus all tables and views to which the user or PUBLIC
  39. remark  has been granted access.
  40. remark
  41. create or replace view ACCESSIBLE_TABLES
  42.     (OWNER, TABLE_NAME, TABLE_TYPE)
  43. as
  44. select u.name, o.name,
  45.        decode(o.type, 2, 'TABLE', 4, 'VIEW')
  46. from sys.user$ u, sys.obj$ o
  47. where o.owner# = u.user#
  48.   and o.linkname is null
  49.   and o.type in (2, 4)
  50.   and (o.owner# = uid
  51.        or
  52.        obj# in (select obj#
  53.                 from sys.objauth$
  54.                 where grantee# in (select kzsrorol from x$kzsro)
  55.                )
  56.       )
  57. /
  58. comment on table ACCESSIBLE_TABLES is
  59. 'Tables and Views accessible to the user'
  60. /
  61. comment on column ACCESSIBLE_TABLES.OWNER is
  62. 'Owner of the object'
  63. /
  64. comment on column ACCESSIBLE_TABLES.TABLE_NAME is
  65. 'Name of the object'
  66. /
  67. comment on column ACCESSIBLE_TABLES.TABLE_TYPE is
  68. 'Type of the object'
  69. /
  70. drop public synonym ACCESSIBLE_TABLES
  71. /
  72. create public synonym ACCESSIBLE_TABLES for ACCESSIBLE_TABLES
  73. /
  74. grant select on ACCESSIBLE_TABLES to PUBLIC with grant option
  75. /
  76. drop public synonym ACCESSIBLE_COLUMNS
  77. /
  78. create public synonym ACCESSIBLE_COLUMNS for ALL_TAB_COLUMNS
  79. /
  80. remark
  81. remark  FAMILY "CONSTRAINT" VIEWS FOR ANSI
  82. remark
  83. create or replace view CONSTRAINT_DEFS
  84.     (OWNER, CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME,
  85.      SEARCH_CONDITION, R_OWNER, R_CONSTRAINT_NAME)
  86. as
  87. select owner, constraint_name, constraint_type, table_name,
  88.        search_condition, r_owner, r_constraint_name
  89. from all_constraints;
  90. /
  91. comment on table CONSTRAINT_DEFS is
  92. 'Constraint Definitions on accessible tables'
  93. /
  94. comment on column CONSTRAINT_DEFS.OWNER is
  95. 'Owner of the table'
  96. /
  97. comment on column CONSTRAINT_DEFS.CONSTRAINT_NAME is
  98. 'Name associated with constraint definition'
  99. /
  100. comment on column CONSTRAINT_DEFS.CONSTRAINT_TYPE is
  101. 'Type of constraint definition'
  102. /
  103. comment on column CONSTRAINT_DEFS.TABLE_NAME is
  104. 'Name associated with table with constraint definition'
  105. /
  106. comment on column CONSTRAINT_DEFS.SEARCH_CONDITION is
  107. 'Text of search condition for table check'
  108. /
  109. comment on column CONSTRAINT_DEFS.R_OWNER is
  110. 'Owner of table used in referential constraint'
  111. /
  112. comment on column CONSTRAINT_DEFS.R_CONSTRAINT_NAME is
  113. 'Name of unique constraint definition for referenced table'
  114. /
  115. grant select on CONSTRAINT_DEFS to public with grant option
  116. /
  117. drop public synonym CONSTRAINT_DEFS
  118. /
  119. create public synonym CONSTRAINT_DEFS for CONSTRAINT_DEFS
  120. /
  121. create or replace view CONSTRAINT_COLUMNS
  122.      (OWNER, CONSTRAINT_NAME, COLUMN_NAME, POSITION)
  123. as
  124. select u.name, c.name, col.name, cc.pos#
  125. from sys.user$ u, sys.con$ c, sys.col$ col, sys.ccol$ cc, sys.cdef$ cd
  126. where c.owner# = u.user#
  127.   and c.con# = cd.con#
  128.   and cd.type in (2,3,4)
  129.   and cd.con# = cc.con#
  130.   and cc.obj# = col.obj#
  131.   and cc.col# = col.col#
  132.   and (c.owner# = uid
  133.        or
  134.        cd.obj# in (select obj#
  135.                from sys.objauth$
  136.            where grantee# in (select kzsrorol from x$kzsro)
  137.                   )
  138.       )
  139. /
  140. comment on table CONSTRAINT_COLUMNS is
  141. 'Information about accessible columns in constraint definitions'
  142. /
  143. comment on column CONSTRAINT_COLUMNS.OWNER is
  144. 'Owner of the constraint definition'
  145. /
  146. comment on column CONSTRAINT_COLUMNS.CONSTRAINT_NAME is
  147. 'Name associated with the constraint definition'
  148. /
  149. comment on column CONSTRAINT_COLUMNS.COLUMN_NAME is
  150. 'Name associated with column specified in the constraint definition'
  151. /
  152. comment on column CONSTRAINT_COLUMNS.POSITION is
  153. 'Original position of column in definition'
  154. /
  155. grant select on CONSTRAINT_COLUMNS to public with grant option
  156. /
  157. drop public synonym CONSTRAINT_COLUMNS
  158. /
  159. create public synonym CONSTRAINT_COLUMNS for CONSTRAINT_COLUMNS
  160. /
  161. remark
  162. remark  FAMILY "CROSS_REFS"
  163. remark  Object cross-referencing information.
  164. remark
  165. create or replace view USER_CROSS_REFS
  166.     (TABLE_NAME, TABLE_TYPE, REF_OWNER, REF_TABLE_NAME, REF_DB_LINK)
  167. as
  168. select o.name, 'SYNONYM', s.owner, s.name, s.node
  169. from sys.syn$ s, sys.obj$ o
  170. where o.owner# = uid
  171.   and o.type = 5
  172.   and o.obj# = s.obj#
  173. union all
  174. select do.name, 'VIEW', nvl(po.remoteowner, pu.name), po.name, po.linkname
  175. from dependency$ d, obj$ do, obj$ po, user$ pu
  176. where d.d_obj# = do.obj#
  177.   and d.d_timestamp = do.stime
  178.   and do.owner# = uid
  179.   and d.p_obj# = po.obj#
  180.   and d.p_timestamp = po.stime
  181.   and po.owner# = pu.user#
  182. /
  183. comment on table USER_CROSS_REFS is 
  184. 'Cross references for user''s views and synonyms'
  185. /
  186. comment on column USER_CROSS_REFS.TABLE_NAME is
  187. 'Name of the referencing object'
  188. /
  189. comment on column USER_CROSS_REFS.TABLE_TYPE is
  190. 'Type of the referencing object'
  191. /
  192. comment on column USER_CROSS_REFS.REF_OWNER is
  193. 'Owner of the referenced object'
  194. /
  195. comment on column USER_CROSS_REFS.REF_TABLE_NAME is
  196. 'Name of the referenced object'
  197. /
  198. comment on column USER_CROSS_REFS.REF_DB_LINK is
  199. 'Database link of the referenced object'
  200. /
  201. drop public synonym USER_CROSS_REFS
  202. /
  203. create public synonym USER_CROSS_REFS for USER_CROSS_REFS
  204. /
  205. grant select on USER_CROSS_REFS to PUBLIC with grant option
  206. /
  207. create or replace view DBA_CROSS_REFS
  208.     (OWNER, TABLE_NAME, TABLE_TYPE, REF_OWNER, REF_TABLE_NAME, REF_DB_LINK)
  209. as
  210. select u.name, o.name, 'SYNONYM', s.owner, s.name, s.node
  211. from sys.syn$ s, sys.obj$ o, sys.user$ u
  212. where o.type = 5
  213.   and o.obj# = s.obj#
  214.   and o.owner# = u.user#
  215. union
  216. select du.name, do.name, 'VIEW', nvl(po.remoteowner, pu.name),
  217.        po.name, po.linkname
  218. from dependency$ d, obj$ do, obj$ po, user$ pu, user$ du
  219. where d.d_obj# = do.obj#
  220.   and d.d_timestamp = do.stime
  221.   and d.p_obj# = po.obj#
  222.   and d.p_timestamp = po.stime
  223.   and po.owner# = pu.user#
  224.   and do.owner# = du.user#
  225. /
  226. comment on table DBA_CROSS_REFS is
  227. 'Cross reference of all views and synonyms'
  228. /
  229. comment on column DBA_CROSS_REFS.OWNER is
  230. 'Owner of the referencing object'
  231. /
  232. comment on column DBA_CROSS_REFS.TABLE_NAME is
  233. 'Name of the referencing object'
  234. /
  235. comment on column DBA_CROSS_REFS.TABLE_TYPE is
  236. 'Type of the referencing object'
  237. /
  238. comment on column DBA_CROSS_REFS.REF_OWNER is
  239. 'Owner of the referenced object'
  240. /
  241. comment on column DBA_CROSS_REFS.REF_TABLE_NAME is
  242. 'Name of the referenced object'
  243. /
  244. comment on column DBA_CROSS_REFS.REF_DB_LINK is
  245. 'Database link of the referenced object'
  246. /
  247. Rem
  248. Rem  Create views which subsitute for old tabauth$ and colauth$ tables
  249. Rem
  250. create or replace view tabauth$ 
  251.   (obj#, grantor#, grantee#, time, sequence#, alter$, 
  252.    delete$,index$, insert$, select$, update$, references$) as
  253.   select obj#, grantor#, grantee#, to_date(max(null)), min(sequence#),
  254.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  255.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 25, 2), 
  256.       '00', 0, '01', 2, '11', 3, 0),
  257.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  258.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 19, 2), 
  259.       '00', 0, '01', 2, '11', 3, 0),
  260.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  261.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 15, 2), 
  262.       '00', 0, '01', 2, '11', 3, 0),
  263.     decode(substr(lpad(sum(decode(col#, null, power(10, privilege#*2) + 
  264.        decode(option$, null, 0, power(10, privilege#*2 + 1)), 0)), 26, '0'), 
  265.               13, 2), '01', 2, '11', 3, 
  266.          decode(substr(lpad(sum(decode(col#, null, 0, power(10, privilege#))),
  267.                 12, '0'), 6, 1), '0', 0, 1)),
  268.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  269.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 7, 2), 
  270.       '00', 0, '01', 2, '11', 3, 0),
  271.     decode(substr(lpad(sum(decode(col#, null, power(10, privilege#*2) + 
  272.       decode(option$, null, 0, power(10, privilege#*2 + 1)), 0)), 26, '0'), 
  273.              5, 2),'01', 2, '11', 3, 
  274.           decode(substr(lpad(sum(decode(col#, null, 0, power(10, privilege#))),
  275.                  12, '0'), 2, 1), '0', 0, 1)),
  276.     decode(substr(lpad(sum(decode(col#, null, power(10, privilege#*2) + 
  277.       decode(option$, null, 0, power(10, privilege#*2 + 1)), 0)), 26, '0'), 
  278.              3, 2), '01', 2, '11', 3, 
  279.           decode(substr(lpad(sum(decode(col#, null, 0, power(10, privilege#))),
  280.                  12, '0'), 1, 1), '0', 0, 1))
  281.   from sys.objauth$
  282.   group by obj#, grantor#, grantee#
  283. /
  284. create or replace view colauth$ (obj#, grantor#, grantee#, time, name, 
  285.                       update$, references$, select$, insert$) as
  286.   select oa.obj#, grantor#, grantee#, to_date(max(null)), max(c.name),
  287.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  288.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 5, 2), 
  289.       '00', 0, '01', 2, '11', 3, 0),
  290.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  291.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 3, 2), 
  292.       '00', 0, '01', 2, '11', 3, 0),
  293.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  294.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 7, 2), 
  295.       '00', 0, '01', 2, '11', 3, 0),
  296.     decode(substr(lpad(sum(power(10, privilege#*2) + 
  297.       decode(option$, null, 0, power(10, privilege#*2 + 1))), 26, '0'), 13, 2), 
  298.       '00', 0, '01', 2, '11', 3, 0)
  299.   from col$ c, objauth$ oa
  300.   where oa.col# is not null and oa.obj# = c.obj# and oa.col# = c.col#
  301.   group by oa.obj#, oa.col#, grantor#, grantee#
  302. /
  303. remark
  304. remark  FAMILY "TAB_GRANTS"
  305. remark  Grants on objects.
  306. remark
  307. create or replace view USER_TAB_GRANTS
  308.       (GRANTEE, OWNER, TABLE_NAME, GRANTOR,
  309.        SELECT_PRIV, INSERT_PRIV, DELETE_PRIV, 
  310.        UPDATE_PRIV, REFERENCES_PRIV, ALTER_PRIV, INDEX_PRIV,
  311.        CREATED)
  312. as
  313. select ue.name, u.name, o.name, ur.name,
  314.        decode(ta.select$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  315.        decode(ta.insert$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  316.        decode(ta.delete$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  317.        decode(ta.update$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  318.        decode(ta.references$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  319.        decode(ta.alter$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  320.        decode(ta.index$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  321.        ta.time
  322. from sys.tabauth$ ta, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  323. where ta.obj# = o.obj#
  324.   and ta.grantor# = ur.user#
  325.   and ta.grantee# = ue.user#
  326.   and u.user# = o.owner#
  327.   and uid in (ta.grantor#, ta.grantee#, o.owner#)
  328. /
  329. comment on table USER_TAB_GRANTS is
  330. 'Grants on objects for which the user is the owner, grantor or grantee'
  331. /
  332. comment on column USER_TAB_GRANTS.GRANTEE is
  333. 'Name of the user to whom access was granted'
  334. /
  335. comment on column USER_TAB_GRANTS.OWNER is
  336. 'Owner of the object'
  337. /
  338. comment on column USER_TAB_GRANTS.TABLE_NAME is
  339. 'Name of the object'
  340. /
  341. comment on column USER_TAB_GRANTS.GRANTOR is
  342. 'Name of the user who performed the grant'
  343. /
  344. comment on column USER_TAB_GRANTS.SELECT_PRIV is
  345. 'Permission to SELECT from the object?'
  346. /
  347. comment on column USER_TAB_GRANTS.INSERT_PRIV is
  348. 'Permission to INSERT into the object?'
  349. /
  350. comment on column USER_TAB_GRANTS.DELETE_PRIV is
  351. 'Permission to DELETE from the object?'
  352. /
  353. comment on column USER_TAB_GRANTS.UPDATE_PRIV is
  354. 'Permission to UPDATE the object?'
  355. /
  356. comment on column USER_TAB_GRANTS.REFERENCES_PRIV is
  357. 'Permission to make REFERENCES to the object?'
  358. /
  359. comment on column USER_TAB_GRANTS.ALTER_PRIV is
  360. 'Permission to ALTER the object?'
  361. /
  362. comment on column USER_TAB_GRANTS.INDEX_PRIV is
  363. 'Permission to create/drop an INDEX on the object?'
  364. /
  365. comment on column USER_TAB_GRANTS.CREATED is
  366. 'Timestamp for the grant'
  367. /
  368. drop public synonym USER_TAB_GRANTS
  369. /
  370. create public synonym USER_TAB_GRANTS for USER_TAB_GRANTS
  371. /
  372. grant select on USER_TAB_GRANTS to PUBLIC
  373. /
  374. create or replace view DBA_TAB_GRANTS
  375.       (GRANTEE, OWNER, TABLE_NAME, GRANTOR,
  376.        SELECT_PRIV, INSERT_PRIV, DELETE_PRIV, 
  377.        UPDATE_PRIV, REFERENCES_PRIV, ALTER_PRIV, INDEX_PRIV,
  378.        CREATED)
  379. as
  380. select ue.name, u.name, o.name, ur.name,
  381.        decode(ta.select$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  382.        decode(ta.insert$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  383.        decode(ta.delete$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  384.        decode(ta.update$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  385.        decode(ta.references$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  386.        decode(ta.alter$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  387.        decode(ta.index$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  388.        ta.time
  389. from sys.tabauth$ ta, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  390. where ta.obj# = o.obj#
  391.   and ta.grantor# = ur.user#
  392.   and ta.grantee# = ue.user#
  393.   and u.user# = o.owner#
  394. /
  395. comment on table DBA_TAB_GRANTS is
  396. 'All grants on objects in the database'
  397. /
  398. comment on column DBA_TAB_GRANTS.GRANTEE is
  399. 'User to whom access was granted'
  400. /
  401. comment on column DBA_TAB_GRANTS.OWNER is
  402. 'Owner of the object'
  403. /
  404. comment on column DBA_TAB_GRANTS.TABLE_NAME is
  405. 'Name of the object'
  406. /
  407. comment on column DBA_TAB_GRANTS.GRANTOR is
  408. 'Name of the user who performed the grant'
  409. /
  410. comment on column DBA_TAB_GRANTS.SELECT_PRIV is
  411. 'Permission to SELECT from the object?'
  412. /
  413. comment on column DBA_TAB_GRANTS.INSERT_PRIV is
  414. 'Permission to INSERT into the object?'
  415. /
  416. comment on column DBA_TAB_GRANTS.DELETE_PRIV is
  417. 'Permission to DELETE from the object?'
  418. /
  419. comment on column DBA_TAB_GRANTS.UPDATE_PRIV is
  420. 'Permission to UPDATE the object?'
  421. /
  422. comment on column DBA_TAB_GRANTS.REFERENCES_PRIV is
  423. 'Permission to make REFERENCES to the object?'
  424. /
  425. comment on column DBA_TAB_GRANTS.ALTER_PRIV is
  426. 'Permission to ALTER the object?'
  427. /
  428. comment on column DBA_TAB_GRANTS.INDEX_PRIV is
  429. 'Permission to create/drop an INDEX on the object?'
  430. /
  431. comment on column DBA_TAB_GRANTS.CREATED is
  432. 'Timestamp for the grant'
  433. /
  434. remark
  435. remark  FAMILY "TAB_GRANTS_MADE"
  436. remark  Grants made on objects.
  437. remark  This family has no DBA member.
  438. remark
  439. create or replace view USER_TAB_GRANTS_MADE
  440.       (GRANTEE, TABLE_NAME, GRANTOR,
  441.        SELECT_PRIV, INSERT_PRIV, DELETE_PRIV, 
  442.        UPDATE_PRIV, REFERENCES_PRIV, ALTER_PRIV, INDEX_PRIV,
  443.        CREATED)
  444. as
  445. select ue.name, o.name, ur.name,
  446.        decode(ta.select$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  447.        decode(ta.insert$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  448.        decode(ta.delete$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  449.        decode(ta.update$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  450.        decode(ta.references$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  451.        decode(ta.alter$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  452.        decode(ta.index$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  453.        ta.time
  454. from sys.tabauth$ ta, sys.obj$ o, sys.user$ ue, sys.user$ ur
  455. where ta.obj# = o.obj#
  456.   and ta.grantor# = ur.user#
  457.   and ta.grantee# = ue.user#
  458.   and o.owner# = uid
  459. /
  460. comment on table USER_TAB_GRANTS_MADE is
  461. 'All grants on objects owned by the user'
  462. /
  463. comment on column USER_TAB_GRANTS_MADE.GRANTEE is
  464. 'Name of the user to whom access was granted'
  465. /
  466. comment on column USER_TAB_GRANTS_MADE.TABLE_NAME is
  467. 'Name of the object'
  468. /
  469. comment on column USER_TAB_GRANTS_MADE.GRANTOR is
  470. 'Name of the user who performed the grant'
  471. /
  472. comment on column USER_TAB_GRANTS_MADE.SELECT_PRIV is
  473. 'Permission to SELECT from the object?'
  474. /
  475. comment on column USER_TAB_GRANTS_MADE.INSERT_PRIV is
  476. 'Permission to INSERT into the object?'
  477. /
  478. comment on column USER_TAB_GRANTS_MADE.DELETE_PRIV is
  479. 'Permission to DELETE from the object?'
  480. /
  481. comment on column USER_TAB_GRANTS_MADE.UPDATE_PRIV is
  482. 'Permission to UPDATE the object?'
  483. /
  484. comment on column USER_TAB_GRANTS_MADE.REFERENCES_PRIV is
  485. 'Permission to make REFERENCES to the object?'
  486. /
  487. comment on column USER_TAB_GRANTS_MADE.ALTER_PRIV is
  488. 'Permission to ALTER the object?'
  489. /
  490. comment on column USER_TAB_GRANTS_MADE.INDEX_PRIV is
  491. 'Permission to CREATE/DROP INDEX on the object?'
  492. /
  493. comment on column USER_TAB_GRANTS_MADE.CREATED is
  494. 'Timestamp for the grant'
  495. /
  496. drop public synonym USER_TAB_GRANTS_MADE
  497. /
  498. create public synonym USER_TAB_GRANTS_MADE for USER_TAB_GRANTS_MADE
  499. /
  500. grant select on USER_TAB_GRANTS_MADE to PUBLIC
  501. /
  502. create or replace view ALL_TAB_GRANTS_MADE
  503.       (GRANTEE, OWNER, TABLE_NAME, GRANTOR,
  504.        SELECT_PRIV, INSERT_PRIV, DELETE_PRIV, 
  505.        UPDATE_PRIV, REFERENCES_PRIV, ALTER_PRIV, INDEX_PRIV,
  506.        CREATED)
  507. as
  508. select ue.name, u.name, o.name, ur.name,
  509.        decode(ta.select$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  510.        decode(ta.insert$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  511.        decode(ta.delete$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  512.        decode(ta.update$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  513.        decode(ta.references$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  514.        decode(ta.alter$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  515.        decode(ta.index$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  516.        ta.time
  517. from sys.tabauth$ ta, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  518. where ta.obj# = o.obj#
  519.   and ta.grantor# = ur.user#
  520.   and ta.grantee# = ue.user#
  521.   and u.user# = o.owner#
  522.   and uid in (o.owner#, ta.grantor#)
  523. /
  524. comment on table ALL_TAB_GRANTS_MADE is
  525. 'User''s grants and grants on user''s objects'
  526. /
  527. comment on column ALL_TAB_GRANTS_MADE.GRANTEE is
  528. 'Name of the user to whom access was granted'
  529. /
  530. comment on column ALL_TAB_GRANTS_MADE.OWNER is
  531. 'Owner of the object'
  532. /
  533. comment on column ALL_TAB_GRANTS_MADE.TABLE_NAME is
  534. 'Name of the object'
  535. /
  536. comment on column ALL_TAB_GRANTS_MADE.GRANTOR is
  537. 'Name of the user who performed the grant'
  538. /
  539. comment on column ALL_TAB_GRANTS_MADE.SELECT_PRIV is
  540. 'Permission to SELECT from the object?'
  541. /
  542. comment on column ALL_TAB_GRANTS_MADE.INSERT_PRIV is
  543. 'Permission to INSERT into the object?'
  544. /
  545. comment on column ALL_TAB_GRANTS_MADE.DELETE_PRIV is
  546. 'Permission to DELETE from the object?'
  547. /
  548. comment on column ALL_TAB_GRANTS_MADE.UPDATE_PRIV is
  549. 'Permission to UPDATE the object?'
  550. /
  551. comment on column ALL_TAB_GRANTS_MADE.REFERENCES_PRIV is
  552. 'Permission to make REFERENCES to the object?'
  553. /
  554. comment on column ALL_TAB_GRANTS_MADE.ALTER_PRIV is
  555. 'Permission to ALTER the object?'
  556. /
  557. comment on column ALL_TAB_GRANTS_MADE.INDEX_PRIV is
  558. 'Permission to CREATE/DROP INDEX on the object?'
  559. /
  560. comment on column ALL_TAB_GRANTS_MADE.CREATED is
  561. 'Timestamp for the grant'
  562. /
  563. drop public synonym ALL_TAB_GRANTS_MADE
  564. /
  565. create public synonym ALL_TAB_GRANTS_MADE for ALL_TAB_GRANTS_MADE
  566. /
  567. grant select on ALL_TAB_GRANTS_MADE to PUBLIC
  568. /
  569. remark
  570. remark  FAMILY "TAB_GRANTS_RECD"
  571. remark  Grants received on objects.
  572. remark  This family has no DBA member.
  573. remark
  574. create or replace view USER_TAB_GRANTS_RECD
  575.       (OWNER, TABLE_NAME, GRANTOR,
  576.        SELECT_PRIV, INSERT_PRIV, DELETE_PRIV, 
  577.        UPDATE_PRIV, REFERENCES_PRIV, ALTER_PRIV, INDEX_PRIV,
  578.        CREATED)
  579. as
  580. select u.name, o.name, ur.name,
  581.        decode(ta.select$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  582.        decode(ta.insert$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  583.        decode(ta.delete$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  584.        decode(ta.update$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  585.        decode(ta.references$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  586.        decode(ta.alter$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  587.        decode(ta.index$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  588.        ta.time
  589. from sys.tabauth$ ta, sys.obj$ o, sys.user$ u, sys.user$ ur
  590. where ta.obj# = o.obj#
  591.   and ta.grantor# = ur.user#
  592.   and u.user# = o.owner#
  593.   and ta.grantee# = uid
  594. /
  595. comment on table USER_TAB_GRANTS_RECD is
  596. 'Grants on objects for which the user is the grantee'
  597. /
  598. comment on column USER_TAB_GRANTS_RECD.OWNER is
  599. 'Owner of the object'
  600. /
  601. comment on column USER_TAB_GRANTS_RECD.TABLE_NAME is
  602. 'Name of the object'
  603. /
  604. comment on column USER_TAB_GRANTS_RECD.GRANTOR is
  605. 'Name of the user who performed the grant'
  606. /
  607. comment on column USER_TAB_GRANTS_RECD.SELECT_PRIV is
  608. 'Permission to SELECT from the object?'
  609. /
  610. comment on column USER_TAB_GRANTS_RECD.INSERT_PRIV is
  611. 'Permission to INSERT into the object?'
  612. /
  613. comment on column USER_TAB_GRANTS_RECD.DELETE_PRIV is
  614. 'Permission to DELETE from the object?'
  615. /
  616. comment on column USER_TAB_GRANTS_RECD.UPDATE_PRIV is
  617. 'Permission to UPDATE the object?'
  618. /
  619. comment on column USER_TAB_GRANTS_RECD.REFERENCES_PRIV is
  620. 'Permission to make REFERENCES to the object?'
  621. /
  622. comment on column USER_TAB_GRANTS_RECD.ALTER_PRIV is
  623. 'Permission to ALTER the object?'
  624. /
  625. comment on column USER_TAB_GRANTS_RECD.INDEX_PRIV is
  626. 'Permission to create/drop an INDEX on the object?'
  627. /
  628. comment on column USER_TAB_GRANTS_RECD.CREATED is
  629. 'Timestamp for the grant'
  630. /
  631. drop public synonym USER_TAB_GRANTS_RECD
  632. /
  633. create public synonym USER_TAB_GRANTS_RECD for USER_TAB_GRANTS_RECD
  634. /
  635. grant select on USER_TAB_GRANTS_RECD to PUBLIC
  636. /
  637. create or replace view ALL_TAB_GRANTS_RECD
  638.       (GRANTEE, OWNER, TABLE_NAME, GRANTOR,
  639.        SELECT_PRIV, INSERT_PRIV, DELETE_PRIV, 
  640.        UPDATE_PRIV, REFERENCES_PRIV, ALTER_PRIV, INDEX_PRIV,
  641.        CREATED)
  642. as
  643. select ue.name, u.name, o.name, ur.name,
  644.        decode(ta.select$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  645.        decode(ta.insert$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  646.        decode(ta.delete$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  647.        decode(ta.update$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  648.        decode(ta.references$, 0, 'N', 1, 'S', 2, 'A', 3, 'G', '?'),
  649.        decode(ta.alter$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  650.        decode(ta.index$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  651.        ta.time
  652. from sys.tabauth$ ta, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  653. where ta.obj# = o.obj#
  654.   and ta.grantor# = ur.user#
  655.   and ta.grantee# = ue.user#
  656.   and u.user# = o.owner#
  657.   and ta.grantee# in (select kzsrorol from x$kzsro)
  658. /
  659. comment on table ALL_TAB_GRANTS_RECD is
  660. 'Grants on objects for which the user or PUBLIC is the grantee'
  661. /
  662. comment on column ALL_TAB_GRANTS_RECD.GRANTEE is
  663. 'Name of the user to whom access was granted'
  664. /
  665. comment on column ALL_TAB_GRANTS_RECD.OWNER is
  666. 'Owner of the object'
  667. /
  668. comment on column ALL_TAB_GRANTS_RECD.TABLE_NAME is
  669. 'Name of the object'
  670. /
  671. comment on column ALL_TAB_GRANTS_RECD.GRANTOR is
  672. 'Name of the user who performed the grant'
  673. /
  674. comment on column ALL_TAB_GRANTS_RECD.SELECT_PRIV is
  675. 'Permission to SELECT from the object?'
  676. /
  677. comment on column ALL_TAB_GRANTS_RECD.INSERT_PRIV is
  678. 'Permission to INSERT into the object?'
  679. /
  680. comment on column ALL_TAB_GRANTS_RECD.DELETE_PRIV is
  681. 'Permission to DELETE from the object?'
  682. /
  683. comment on column ALL_TAB_GRANTS_RECD.UPDATE_PRIV is
  684. 'Permission to UPDATE the object?'
  685. /
  686. comment on column ALL_TAB_GRANTS_RECD.REFERENCES_PRIV is
  687. 'Permission to make REFERENCES to the object?'
  688. /
  689. comment on column ALL_TAB_GRANTS_RECD.ALTER_PRIV is
  690. 'Permission to ALTER the object?'
  691. /
  692. comment on column ALL_TAB_GRANTS_RECD.INDEX_PRIV is
  693. 'Permission to create/drop an INDEX on the object?'
  694. /
  695. comment on column ALL_TAB_GRANTS_RECD.CREATED is
  696. 'Timestamp for the grant'
  697. /
  698. drop public synonym ALL_TAB_GRANTS_RECD
  699. /
  700. create public synonym ALL_TAB_GRANTS_RECD for ALL_TAB_GRANTS_RECD
  701. /
  702. grant select on ALL_TAB_GRANTS_RECD to PUBLIC
  703. /
  704. remark
  705. remark  FAMILY "COL_GRANTS"
  706. remark  Grants on columns.
  707. remark
  708. create or replace view USER_COL_GRANTS
  709.       (GRANTEE, OWNER, TABLE_NAME, COLUMN_NAME, GRANTOR,
  710.        UPDATE_PRIV, REFERENCES_PRIV,
  711.        CREATED)
  712. as
  713. select ue.name, u.name, o.name, ca.name, ur.name,
  714.        decode(ca.update$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  715.        decode(ca.references$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  716.        ca.time
  717. from sys.colauth$ ca, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  718. where ca.obj# = o.obj#
  719.   and ca.grantor# = ur.user#
  720.   and ca.grantee# = ue.user#
  721.   and u.user# = o.owner#
  722.   and uid in (ca.grantor#, ca.grantee#, o.owner#)
  723. /
  724. comment on table USER_COL_GRANTS is
  725. 'Grants on columns for which the user is the owner, grantor or grantee'
  726. /
  727. comment on column USER_COL_GRANTS.GRANTEE is
  728. 'Name of the user to whom access was granted'
  729. /
  730. comment on column USER_COL_GRANTS.OWNER is
  731. 'Username of the owner of the object'
  732. /
  733. comment on column USER_COL_GRANTS.TABLE_NAME is
  734. 'Name of the object'
  735. /
  736. comment on column USER_COL_GRANTS.COLUMN_NAME is
  737. 'Name of the column'
  738. /
  739. comment on column USER_COL_GRANTS.GRANTOR is
  740. 'Name of the user who performed the grant'
  741. /
  742. comment on column USER_COL_GRANTS.UPDATE_PRIV is
  743. 'Permission to UPDATE the column?'
  744. /
  745. comment on column USER_COL_GRANTS.REFERENCES_PRIV is
  746. 'Permission to make REFERENCES to the column?'
  747. /
  748. comment on column USER_COL_GRANTS.CREATED is
  749. 'Timestamp for the grant'
  750. /
  751. drop public synonym USER_COL_GRANTS
  752. /
  753. create public synonym USER_COL_GRANTS for USER_COL_GRANTS
  754. /
  755. grant select on USER_COL_GRANTS to PUBLIC
  756. /
  757. drop public synonym ALL_TAB_GRANTS
  758. /
  759. create public synonym ALL_TAB_GRANTS for TABLE_PRIVILEGES
  760. /
  761. drop public synonym ALL_COL_GRANTS
  762. /
  763. create public synonym ALL_COL_GRANTS for COLUMN_PRIVILEGES
  764. /
  765. create or replace view DBA_COL_GRANTS
  766.       (GRANTEE, OWNER, TABLE_NAME, COLUMN_NAME, GRANTOR,
  767.        UPDATE_PRIV, REFERENCES_PRIV,
  768.        CREATED)
  769. as
  770. select ue.name, u.name, o.name, ca.name, ur.name,
  771.        decode(ca.update$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  772.        decode(ca.references$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  773.        ca.time
  774. from sys.colauth$ ca, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  775. where ca.obj# = o.obj#
  776.   and ca.grantor# = ur.user#
  777.   and ca.grantee# = ue.user#
  778.   and u.user# = o.owner#
  779. /
  780. comment on table DBA_COL_GRANTS is
  781. 'All grants on columns in the database'
  782. /
  783. comment on column DBA_COL_GRANTS.GRANTEE is
  784. 'Name of the user to whom access was granted'
  785. /
  786. comment on column DBA_COL_GRANTS.OWNER is
  787. 'Username of the owner of the object'
  788. /
  789. comment on column DBA_COL_GRANTS.TABLE_NAME is
  790. 'Name of the object'
  791. /
  792. comment on column DBA_COL_GRANTS.COLUMN_NAME is
  793. 'Name of the column'
  794. /
  795. comment on column DBA_COL_GRANTS.GRANTOR is
  796. 'Name of the user who performed the grant'
  797. /
  798. comment on column DBA_COL_GRANTS.UPDATE_PRIV is
  799. 'Permission to UPDATE the column?'
  800. /
  801. comment on column DBA_COL_GRANTS.REFERENCES_PRIV is
  802. 'Permission to make REFERENCES to the column?'
  803. /
  804. comment on column DBA_COL_GRANTS.CREATED is
  805. 'Timestamp for the grant'
  806. /
  807. remark
  808. remark  FAMILY "COL_GRANTS_MADE"
  809. remark  Grants on columns made by the user.
  810. remark  This family has no DBA member.
  811. remark
  812. create or replace view USER_COL_GRANTS_MADE
  813.       (GRANTEE, TABLE_NAME, COLUMN_NAME, GRANTOR,
  814.        UPDATE_PRIV, REFERENCES_PRIV,
  815.        CREATED)
  816. as
  817. select ue.name, o.name, ca.name, ur.name,
  818.        decode(ca.update$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  819.        decode(ca.references$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  820.        ca.time
  821. from sys.colauth$ ca, sys.obj$ o, sys.user$ ue, sys.user$ ur
  822. where ca.obj# = o.obj#
  823.   and ca.grantor# = ur.user#
  824.   and ca.grantee# = ue.user#
  825.   and o.owner# = uid
  826. /
  827. comment on table USER_COL_GRANTS_MADE is
  828. 'All grants on columns of objects owned by the user'
  829. /
  830. comment on column USER_COL_GRANTS_MADE.GRANTEE is
  831. 'Name of the user to whom access was granted'
  832. /
  833. comment on column USER_COL_GRANTS_MADE.TABLE_NAME is
  834. 'Name of the object'
  835. /
  836. comment on column USER_COL_GRANTS_MADE.COLUMN_NAME is
  837. 'Name of the column'
  838. /
  839. comment on column USER_COL_GRANTS_MADE.GRANTOR is
  840. 'Name of the user who performed the grant'
  841. /
  842. comment on column USER_COL_GRANTS_MADE.UPDATE_PRIV is
  843. 'Permission to UPDATE the column?'
  844. /
  845. comment on column USER_COL_GRANTS_MADE.REFERENCES_PRIV is
  846. 'Permission to make REFERENCES to the column?'
  847. /
  848. comment on column USER_COL_GRANTS_MADE.CREATED is
  849. 'Timestamp for the grant'
  850. /
  851. drop public synonym USER_COL_GRANTS_MADE
  852. /
  853. create public synonym USER_COL_GRANTS_MADE for USER_COL_GRANTS_MADE
  854. /
  855. grant select on USER_COL_GRANTS_MADE to PUBLIC
  856. /
  857. create or replace view ALL_COL_GRANTS_MADE
  858.       (GRANTEE, OWNER, TABLE_NAME, COLUMN_NAME, GRANTOR,
  859.        UPDATE_PRIV, REFERENCES_PRIV,
  860.        CREATED)
  861. as
  862. select ue.name, u.name, o.name, ca.name, ur.name,
  863.        decode(ca.update$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  864.        decode(ca.references$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  865.        ca.time
  866. from sys.colauth$ ca, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  867. where ca.obj# = o.obj#
  868.   and ca.grantor# = ur.user#
  869.   and ca.grantee# = ue.user#
  870.   and u.user# = o.owner#
  871.   and uid in (o.owner#, ca.grantor#)
  872. /
  873. comment on table ALL_COL_GRANTS_MADE is
  874. 'Grants on columns for which the user is owner or grantor'
  875. /
  876. comment on column ALL_COL_GRANTS_MADE.GRANTEE is
  877. 'Name of the user to whom access was granted'
  878. /
  879. comment on column ALL_COL_GRANTS_MADE.OWNER is
  880. 'Username of the owner of the object'
  881. /
  882. comment on column ALL_COL_GRANTS_MADE.TABLE_NAME is
  883. 'Name of the object'
  884. /
  885. comment on column ALL_COL_GRANTS_MADE.COLUMN_NAME is
  886. 'Name of the column'
  887. /
  888. comment on column ALL_COL_GRANTS_MADE.GRANTOR is
  889. 'Name of the user who performed the grant'
  890. /
  891. comment on column ALL_COL_GRANTS_MADE.UPDATE_PRIV is
  892. 'Permission to UPDATE the column?'
  893. /
  894. comment on column ALL_COL_GRANTS_MADE.REFERENCES_PRIV is
  895. 'Permission to make REFERENCES to the column?'
  896. /
  897. comment on column ALL_COL_GRANTS_MADE.CREATED is
  898. 'Timestamp for the grant'
  899. /
  900. drop public synonym ALL_COL_GRANTS_MADE
  901. /
  902. create public synonym ALL_COL_GRANTS_MADE for ALL_COL_GRANTS_MADE
  903. /
  904. grant select on ALL_COL_GRANTS_MADE to PUBLIC
  905. /
  906. remark
  907. remark  FAMILY "COL_GRANTS_RECD"
  908. remark  Received grants on columns
  909. remark
  910. create or replace view USER_COL_GRANTS_RECD
  911.       (OWNER, TABLE_NAME, COLUMN_NAME, GRANTOR,
  912.        UPDATE_PRIV, REFERENCES_PRIV,
  913.        CREATED)
  914. as
  915. select u.name, o.name, ca.name, ur.name,
  916.        decode(ca.update$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  917.        decode(ca.references$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  918.        ca.time
  919. from sys.colauth$ ca, sys.obj$ o, sys.user$ u, sys.user$ ur
  920. where ca.obj# = o.obj#
  921.   and ca.grantor# = ur.user#
  922.   and u.user# = o.owner#
  923.   and ca.grantee# = uid
  924. /
  925. comment on table USER_COL_GRANTS_RECD is
  926. 'Grants on columns for which the user is the grantee'
  927. /
  928. comment on column USER_COL_GRANTS_RECD.OWNER is
  929. 'Username of the owner of the object'
  930. /
  931. comment on column USER_COL_GRANTS_RECD.TABLE_NAME is
  932. 'Name of the object'
  933. /
  934. comment on column USER_COL_GRANTS_RECD.COLUMN_NAME is
  935. 'Name of the column'
  936. /
  937. comment on column USER_COL_GRANTS_RECD.GRANTOR is
  938. 'Name of the user who performed the grant'
  939. /
  940. comment on column USER_COL_GRANTS_RECD.UPDATE_PRIV is
  941. 'Permission to UPDATE the column?'
  942. /
  943. comment on column USER_COL_GRANTS_RECD.REFERENCES_PRIV is
  944. 'Permission to make REFERENCES to the column?'
  945. /
  946. comment on column USER_COL_GRANTS_RECD.CREATED is
  947. 'Timestamp for the grant'
  948. /
  949. drop public synonym USER_COL_GRANTS_RECD
  950. /
  951. create public synonym USER_COL_GRANTS_RECD for USER_COL_GRANTS_RECD
  952. /
  953. grant select on USER_COL_GRANTS_RECD to PUBLIC
  954. /
  955. create or replace view ALL_COL_GRANTS_RECD
  956.       (GRANTEE, OWNER, TABLE_NAME, COLUMN_NAME, GRANTOR,
  957.        UPDATE_PRIV, REFERENCES_PRIV,
  958.        CREATED)
  959. as
  960. select ue.name, u.name, o.name, ca.name, ur.name,
  961.        decode(ca.update$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  962.        decode(ca.references$, 0, 'N', 2, 'Y', 3, 'G', '?'),
  963.        ca.time
  964. from sys.colauth$ ca, sys.obj$ o, sys.user$ u, sys.user$ ur, sys.user$ ue
  965. where ca.obj# = o.obj#
  966.   and ca.grantor# = ur.user#
  967.   and ca.grantee# = ue.user#
  968.   and u.user# = o.owner#
  969.   and ca.grantee# in (select kzsrorol from x$kzsro)
  970. /
  971. comment on table ALL_COL_GRANTS_RECD is
  972. 'Grants on columns for which the user or PUBLIC is the grantee'
  973. /
  974. comment on column ALL_COL_GRANTS_RECD.GRANTEE is
  975. 'Name of the user to whom access was granted'
  976. /
  977. comment on column ALL_COL_GRANTS_RECD.OWNER is
  978. 'Username of the owner of the object'
  979. /
  980. comment on column ALL_COL_GRANTS_RECD.TABLE_NAME is
  981. 'Name of the object'
  982. /
  983. comment on column ALL_COL_GRANTS_RECD.COLUMN_NAME is
  984. 'Name of the column'
  985. /
  986. comment on column ALL_COL_GRANTS_RECD.GRANTOR is
  987. 'Name of the user who performed the grant'
  988. /
  989. comment on column ALL_COL_GRANTS_RECD.UPDATE_PRIV is
  990. 'Permission to UPDATE the column?'
  991. /
  992. comment on column ALL_COL_GRANTS_RECD.REFERENCES_PRIV is
  993. 'Permission to make REFERENCES to the column?'
  994. /
  995. comment on column ALL_COL_GRANTS_RECD.CREATED is
  996. 'Timestamp for the grant'
  997. /
  998. drop public synonym ALL_COL_GRANTS_RECD
  999. /
  1000. create public synonym ALL_COL_GRANTS_RECD for ALL_COL_GRANTS_RECD
  1001. /
  1002. grant select on ALL_COL_GRANTS_RECD to PUBLIC
  1003. /
  1004.  
  1005. remark
  1006. remark  USER_AUDIT_CONNECT
  1007. remark  Lists the audit trail entries produced by AUDIT CONNECT.
  1008. remark  DBA's see all entries, while ordinary users only
  1009. remark  see entries for their own logins/logoffs.
  1010. remark
  1011. remark  DBA_AUDIT_CONNECT is implemented as synonym of user_audit_connect,
  1012. remark  which in turn is implemented in terms of user_audit_trail.
  1013. remark
  1014. create or replace view USER_AUDIT_CONNECT as
  1015.   select username, userhost, terminal, timestamp,
  1016.          action_name,
  1017.          logoff_time, logoff_lread, logoff_pread, logoff_lwrite, logoff_dlock,
  1018.          sessionid, returncode
  1019.   from user_audit_trail
  1020.   where action between 100 and 102
  1021. /
  1022. comment on table USER_AUDIT_CONNECT is
  1023. 'Audit trail entries for user logons/logoffs'
  1024. /
  1025. comment on column USER_AUDIT_CONNECT.USERNAME is
  1026. 'Name (not ID number) of the user whose actions were audited'
  1027. /
  1028. comment on column USER_AUDIT_CONNECT.USERHOST is
  1029. 'Numeric instance ID for the Oracle instance from which the user is accessing t\
  1030. he database.  Used only in environments with distributed file systems and share\
  1031. d database files (e.g., clustered Oracle on DEC VAX/VMS clusters)'
  1032. /
  1033. comment on column USER_AUDIT_CONNECT.TERMINAL is
  1034. 'Identifier for the user''s terminal'
  1035. /
  1036. comment on column USER_AUDIT_CONNECT.TIMESTAMP is
  1037. 'Timestamp for the user''s logon'
  1038. /
  1039. comment on column USER_AUDIT_CONNECT.ACTION_NAME is
  1040. 'Name of the action type corresponding to the numeric code in ACTION'
  1041. /
  1042. remark  A single audit entry describes both the logon and logoff.
  1043. remark  The logoff_* columns are null while a user is logged in.
  1044. /
  1045. comment on column USER_AUDIT_CONNECT.LOGOFF_TIME is
  1046. 'Timestamp for user logoff'
  1047. /
  1048. comment on column USER_AUDIT_CONNECT.LOGOFF_LREAD is
  1049. 'Logical reads for the session'
  1050. /
  1051. comment on column USER_AUDIT_CONNECT.LOGOFF_PREAD is
  1052. 'Physical reads for the session'
  1053. /
  1054. comment on column USER_AUDIT_CONNECT.LOGOFF_LWRITE is
  1055. 'Logical writes for the session'
  1056. /
  1057. comment on column USER_AUDIT_CONNECT.LOGOFF_DLOCK is
  1058. 'Deadlocks detected during the session'
  1059. /
  1060. comment on column USER_AUDIT_CONNECT.SESSIONID is
  1061. 'Numeric ID for each Oracle session'
  1062. /
  1063. comment on column USER_AUDIT_CONNECT.RETURNCODE is
  1064. 'Oracle error code generated by the action.  Zero if the action succeeded'
  1065. /
  1066. drop public synonym USER_AUDIT_CONNECT
  1067. /
  1068. create public synonym USER_AUDIT_CONNECT for USER_AUDIT_CONNECT
  1069. /
  1070. grant select on USER_AUDIT_CONNECT to public
  1071. /
  1072. drop public synonym DBA_AUDIT_CONNECT
  1073. /
  1074. create public synonym DBA_AUDIT_CONNECT for USER_AUDIT_CONNECT
  1075. /
  1076. remark
  1077. remark  USER_AUDIT_RESOURCE
  1078. remark  DBA_AUDIT_RESOURCE implemented in terms of user_audit_resource.
  1079. remark  DBA Sees all.
  1080. remark
  1081. remark  Lists audit trail entries produced by AUDIT RESOURCE.
  1082. remark
  1083. /
  1084. create or replace view USER_AUDIT_RESOURCE as
  1085.   select username, userhost, terminal, timestamp,
  1086.          owner, obj_name,
  1087.          action_name,
  1088.          sessionid, entryid, statementid, returncode
  1089.   from user_audit_trail
  1090.   where action in (1, 4, 8, 9, 10, 12, 13, 16, 19, 20, 21, 22, 24,
  1091.                    32, 33, 36, 38, 39, 41, 58, 59, 61, 65, 66, 68,
  1092.                    71, 73, 74, 76, 110, 111, 112, 113)
  1093. /
  1094. comment on column USER_AUDIT_RESOURCE.USERNAME is
  1095. 'Name (not ID number) of the user whose actions were audited'
  1096. /
  1097. comment on column USER_AUDIT_RESOURCE.USERHOST is
  1098. 'Numeric instance ID for the Oracle instance from which the user is accessing t\
  1099. he database.  Used only in environments with distributed file systems and share\
  1100. d database files (e.g., clustered Oracle on DEC VAX/VMS clusters)'
  1101. /
  1102. comment on column USER_AUDIT_RESOURCE.TERMINAL is
  1103. 'Identifier for the user''s terminal'
  1104. /
  1105. comment on column USER_AUDIT_RESOURCE.TIMESTAMP is
  1106. 'Timestamp for the creation of the audit trail entry'
  1107. /
  1108. comment on column USER_AUDIT_RESOURCE.OWNER is
  1109. 'Intended creator of the non-existent object'
  1110. /
  1111. comment on column USER_AUDIT_RESOURCE.OBJ_NAME is
  1112. 'Name of the object affected by the action'
  1113. /
  1114. comment on column USER_AUDIT_RESOURCE.ACTION_NAME is
  1115. 'Name of the action type corresponding to the numeric code in ACTION'
  1116. /
  1117. comment on column USER_AUDIT_RESOURCE.SESSIONID is
  1118. 'Numeric ID for each Oracle session'
  1119. /
  1120. comment on column USER_AUDIT_RESOURCE.ENTRYID is
  1121. 'Numeric ID for each audit trail entry in the session'
  1122. /
  1123. comment on column USER_AUDIT_RESOURCE.STATEMENTID is
  1124. 'Numeric ID for each statement run (a statement may cause many actions)'
  1125. /
  1126. comment on column USER_AUDIT_RESOURCE.RETURNCODE is
  1127. 'Oracle error code generated by the action.  Zero if the action succeeded'
  1128. /
  1129. drop public synonym USER_AUDIT_RESOURCE
  1130. /
  1131. create public synonym USER_AUDIT_RESOURCE for USER_AUDIT_RESOURCE
  1132. /
  1133. grant select on USER_AUDIT_RESOURCE to public
  1134. /
  1135. drop public synonym DBA_AUDIT_RESOURCE
  1136. /
  1137. create public synonym DBA_AUDIT_RESOURCE for USER_AUDIT_RESOURCE
  1138. /
  1139.  
  1140. remark
  1141. remark  DBA_AUDIT_DBA
  1142. remark  This view is only accessible to DBAs.
  1143. remark  Lists audit trail entries produced by AUDIT DBA
  1144. remark
  1145. remark
  1146. remark  The connect, resource and dba columns are filled in for
  1147. remark  entries related to granting/revoking system-wide privileges.
  1148. remark  The value 'Y' indicates the priv was granted/revoked.  If not,
  1149. remark  a '-' appears.
  1150. remark
  1151. /
  1152. create or replace view DBA_AUDIT_DBA as
  1153.   select username, userhost, terminal, timestamp,
  1154.          owner, 
  1155.      decode(obj_name, 'CONNECT', NULL, 'RESOURCE', NULL, 'DBA', NULL,
  1156.             obj_name) obj_name,
  1157.          action, action_name,
  1158.      decode(action, 108, decode(logoff_dlock, 5, 'Y', '-'),
  1159.             109, decode(logoff_dlock, 5, 'Y', '-'),
  1160.                 114, decode(obj_name, 'CONNECT', 'Y', '-'),
  1161.                 115, decode(obj_name, 'CONNECT', 'Y', '-')) connect_priv,
  1162.      decode(obj_name, 'DBA', 'Y', '-') dba_priv,
  1163.      decode(action, 108, decode(logoff_dlock, 15, 'Y', '-'),
  1164.                 109, decode(logoff_dlock, 15, 'Y', '-'),
  1165.                 114, decode(obj_name, 'RESOURCE', 'Y', '-'),
  1166.                 115, decode(obj_name, 'RESOURCE', 'Y', '-')) resource_priv,
  1167.          grantee,
  1168.          sessionid, entryid, statementid, returncode
  1169.    from user_audit_trail
  1170.    where action in (17, 18, 30, 31, 43, 79)
  1171.          or action between 51 and 55
  1172.      or action between 104 and 115
  1173. /
  1174. comment on table DBA_AUDIT_DBA is
  1175. 'Audit trail entries created by AUDIT DBA'
  1176. /
  1177. comment on column DBA_AUDIT_DBA.USERNAME is
  1178. 'Name (not ID number) of the user whose actions were audited'
  1179. /
  1180. comment on column DBA_AUDIT_DBA.USERHOST is
  1181. 'Numeric instance ID for the Oracle instance from which the user is accessing t\
  1182. he database.  Used only in environments with distributed file systems and share\
  1183. d database files (e.g., clustered Oracle on DEC VAX/VMS clusters)'
  1184. /
  1185. comment on column DBA_AUDIT_DBA.TERMINAL is
  1186. 'Identifier for the user''s terminal'
  1187. /
  1188. comment on column DBA_AUDIT_DBA.TIMESTAMP is
  1189. 'Timestamp for the creation of the audit trail entry (Timestamp for the user''s\
  1190.  logon for entries created by AUDIT CONNECT)'
  1191. /
  1192. comment on column DBA_AUDIT_DBA.OWNER is
  1193. 'Creator of object affected by the action'
  1194. /
  1195. comment on column DBA_AUDIT_DBA.OBJ_NAME is
  1196. 'Name of the object affected by the action'
  1197. /
  1198. comment on column DBA_AUDIT_DBA.ACTION is
  1199. 'Numeric action type code.  The corresponding name of the action type (CREATE T\
  1200. ABLE, INSERT, etc.) is in the column ACTION_NAME'
  1201. /
  1202. comment on column DBA_AUDIT_DBA.ACTION_NAME is
  1203. 'Name of the action type corresponding to the numeric code in ACTION'
  1204. /
  1205. comment on column DBA_AUDIT_DBA.CONNECT_PRIV is
  1206. 'Y or - for CONNECT privilege did or did not appear in GRANT/REVOKE statement'
  1207. /
  1208. comment on column DBA_AUDIT_DBA.DBA_PRIV is
  1209. 'Y or - for DBA privilege did or did not appear in GRANT/REVOKE statement'
  1210. /
  1211. comment on column DBA_AUDIT_DBA.RESOURCE_PRIV is
  1212. 'Y or - for RESOURCE privilege did or did not appear in GRANT/REVOKE statement'
  1213. /
  1214. remark  There is one audit entry for each grantee.
  1215. /
  1216. comment on column DBA_AUDIT_DBA.GRANTEE is
  1217. 'The name of the grantee specified in a GRANT/REVOKE statement'
  1218. /
  1219. comment on column DBA_AUDIT_DBA.SESSIONID is
  1220. 'Numeric ID for each Oracle session'
  1221. /
  1222. comment on column DBA_AUDIT_DBA.ENTRYID is
  1223. 'Numeric ID for each audit trail entry in the session'
  1224. /
  1225. comment on column DBA_AUDIT_DBA.STATEMENTID is
  1226. 'Numeric ID for each statement run (a statement may cause many actions)'
  1227. /
  1228. comment on column DBA_AUDIT_DBA.RETURNCODE is
  1229. 'Oracle error code generated by the action.  Zero if the action succeeded'
  1230. /
  1231. drop public synonym DBA_AUDIT_DBA
  1232. /
  1233. create public synonym DBA_AUDIT_DBA for DBA_AUDIT_DBA
  1234. /
  1235.  
  1236. remark
  1237. remark  FAMILY "TAB_AUDIT_OPTS"
  1238. remark  Auditing options on objects.  Only "user_" and "dba_" members.
  1239. remark  A user is not allowed to see audit options for other people's objects.
  1240. remark
  1241. remark  These views indicate what kind of audit trail entries (none,
  1242. remark  session-level, or access-level) are generated by the success or failure
  1243. remark  of each possible operation on a table or view (e.g., select, alter).
  1244. remark
  1245. remark  The values in the columns ALT through UPD are three character
  1246. remark  strings like 'A/S', 'A/-'.  The letters 'A', 'S', and '-' correspond to
  1247. remark  different levels of detail called Access, Session and None.  The
  1248. remark  character before the slash determines the auditing level if the action
  1249. remark  is successful.  The character after the slash determines auditing level
  1250. remark  if the operation fails for any reason.
  1251. remark
  1252. remark  This compressed three character format has been chosen to make all
  1253. remark  the information fit on a single line.  The column names are
  1254. remark  three chars long for the same reason.  The alternative is to use long
  1255. remark  column names to improve readability, but
  1256. remark  serious users can get further documentation using the describe
  1257. remark  column statement.  I do not expect novice users to be looking at audit
  1258. remark  information.  Another alternative is to have separate columns for the
  1259. remark  success and failure settings.  This would eliminate the need to
  1260. remark  use the substr function in views built on top of these views,
  1261. remark  but the advantage to users of making information fit on one line
  1262. remark  overrides the hassle to view-implementors of using the substr function.
  1263. remark
  1264. create or replace view USER_TAB_AUDIT_OPTS
  1265.     (TABLE_NAME,
  1266.      TABLE_TYPE,
  1267.      ALT,
  1268.      AUD,
  1269.      COM,
  1270.      DEL,
  1271.      GRA,
  1272.      IND,
  1273.      INS,
  1274.      LOC,
  1275.      REN,
  1276.      SEL,
  1277.      UPD)
  1278. as
  1279. select o.name, 'TABLE',
  1280.        substr(t.audit$, 1, 1) || '/' || substr(t.audit$, 2, 1),
  1281.        substr(t.audit$, 3, 1) || '/' || substr(t.audit$, 4, 1),
  1282.        substr(t.audit$, 5, 1) || '/' || substr(t.audit$, 6, 1),
  1283.        substr(t.audit$, 7, 1) || '/' || substr(t.audit$, 8, 1),
  1284.        substr(t.audit$, 9, 1) || '/' || substr(t.audit$, 10, 1),
  1285.        substr(t.audit$, 11, 1) || '/' || substr(t.audit$, 12, 1),
  1286.        substr(t.audit$, 13, 1) || '/' || substr(t.audit$, 14, 1),
  1287.        substr(t.audit$, 15, 1) || '/' || substr(t.audit$, 16, 1),
  1288.        substr(t.audit$, 17, 1) || '/' || substr(t.audit$, 18, 1),
  1289.        substr(t.audit$, 19, 1) || '/' || substr(t.audit$, 20, 1),
  1290.        substr(t.audit$, 21, 1) || '/' || substr(t.audit$, 22, 1)
  1291. from sys.obj$ o, sys.tab$ t
  1292. where o.type = 2
  1293.   and not (o.owner# = 0 and o.name = '_default_auditing_options_')
  1294.   and o.owner# = uid
  1295.   and o.obj# = t.obj#
  1296. union all
  1297. select o.name, 'VIEW',
  1298.        substr(v.audit$, 1, 1) || '/' || substr(v.audit$, 2, 1),
  1299.        substr(v.audit$, 3, 1) || '/' || substr(v.audit$, 4, 1),
  1300.        substr(v.audit$, 5, 1) || '/' || substr(v.audit$, 6, 1),
  1301.        substr(v.audit$, 7, 1) || '/' || substr(v.audit$, 8, 1),
  1302.        substr(v.audit$, 9, 1) || '/' || substr(v.audit$, 10, 1),
  1303.        substr(v.audit$, 11, 1) || '/' || substr(v.audit$, 12, 1),
  1304.        substr(v.audit$, 13, 1) || '/' || substr(v.audit$, 14, 1),
  1305.        substr(v.audit$, 15, 1) || '/' || substr(v.audit$, 16, 1),
  1306.        substr(v.audit$, 17, 1) || '/' || substr(v.audit$, 18, 1),
  1307.        substr(v.audit$, 19, 1) || '/' || substr(v.audit$, 20, 1),
  1308.        substr(v.audit$, 21, 1) || '/' || substr(v.audit$, 22, 1)
  1309. from sys.obj$ o, sys.view$ v
  1310. where o.type = 4
  1311.   and o.owner# = uid
  1312.   and o.obj# = v.obj#
  1313. /
  1314. comment on table USER_TAB_AUDIT_OPTS is
  1315. 'Auditing options for user''s own tables and views'
  1316. /
  1317. comment on column USER_TAB_AUDIT_OPTS.TABLE_NAME is
  1318. 'Name of the object'
  1319. /
  1320. comment on column USER_TAB_AUDIT_OPTS.TABLE_TYPE is
  1321. 'Type of the object:  "TABLE" or "VIEW"'
  1322. /
  1323. comment on column USER_TAB_AUDIT_OPTS.ALT is
  1324. 'Auditing ALTER WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1325. /
  1326. comment on column USER_TAB_AUDIT_OPTS.AUD is
  1327. 'Auditing AUDIT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1328. /
  1329. comment on column USER_TAB_AUDIT_OPTS.COM is
  1330. 'Auditing COMMENT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1331. /
  1332. comment on column USER_TAB_AUDIT_OPTS.DEL is
  1333. 'Auditing DELETE WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1334. /
  1335. comment on column USER_TAB_AUDIT_OPTS.GRA is
  1336. 'Auditing GRANT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1337. /
  1338. comment on column USER_TAB_AUDIT_OPTS.IND is
  1339. 'Auditing INDEX WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1340. /
  1341. comment on column USER_TAB_AUDIT_OPTS.INS is
  1342. 'Auditing INSERT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1343. /
  1344. comment on column USER_TAB_AUDIT_OPTS.LOC is
  1345. 'Auditing LOCK WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1346. /
  1347. comment on column USER_TAB_AUDIT_OPTS.REN is
  1348. 'Auditing RENAME WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1349. /
  1350. comment on column USER_TAB_AUDIT_OPTS.SEL is
  1351. 'Auditing SELECT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1352. /
  1353. comment on column USER_TAB_AUDIT_OPTS.UPD is
  1354. 'Auditing UPDATE WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1355. /
  1356. drop public synonym USER_TAB_AUDIT_OPTS
  1357. /
  1358. create public synonym USER_TAB_AUDIT_OPTS for USER_TAB_AUDIT_OPTS
  1359. /
  1360. grant select on USER_TAB_AUDIT_OPTS to PUBLIC
  1361. /
  1362. create or replace view DBA_TAB_AUDIT_OPTS
  1363.     (OWNER,
  1364.      TABLE_NAME,
  1365.      TABLE_TYPE,
  1366.      ALT,
  1367.      AUD,
  1368.      COM,
  1369.      DEL,
  1370.      GRA,
  1371.      IND,
  1372.      INS,
  1373.      LOC,
  1374.      REN,
  1375.      SEL,
  1376.      UPD)
  1377. as
  1378. select u.name, o.name, 'TABLE',
  1379.        substr(t.audit$, 1, 1) || '/' || substr(t.audit$, 2, 1),
  1380.        substr(t.audit$, 3, 1) || '/' || substr(t.audit$, 4, 1),
  1381.        substr(t.audit$, 5, 1) || '/' || substr(t.audit$, 6, 1),
  1382.        substr(t.audit$, 7, 1) || '/' || substr(t.audit$, 8, 1),
  1383.        substr(t.audit$, 9, 1) || '/' || substr(t.audit$, 10, 1),
  1384.        substr(t.audit$, 11, 1) || '/' || substr(t.audit$, 12, 1),
  1385.        substr(t.audit$, 13, 1) || '/' || substr(t.audit$, 14, 1),
  1386.        substr(t.audit$, 15, 1) || '/' || substr(t.audit$, 16, 1),
  1387.        substr(t.audit$, 17, 1) || '/' || substr(t.audit$, 18, 1),
  1388.        substr(t.audit$, 19, 1) || '/' || substr(t.audit$, 20, 1),
  1389.        substr(t.audit$, 21, 1) || '/' || substr(t.audit$, 22, 1)
  1390. from sys.obj$ o, sys.user$ u, sys.tab$ t
  1391. where o.type = 2
  1392.   and not (o.owner# = 0 and o.name = '_default_auditing_options_')
  1393.   and o.owner# = u.user#
  1394.   and o.obj# = t.obj#
  1395. union all
  1396. select u.name, o.name, 'VIEW',
  1397.        substr(v.audit$, 1, 1) || '/' || substr(v.audit$, 2, 1),
  1398.        substr(v.audit$, 3, 1) || '/' || substr(v.audit$, 4, 1),
  1399.        substr(v.audit$, 5, 1) || '/' || substr(v.audit$, 6, 1),
  1400.        substr(v.audit$, 7, 1) || '/' || substr(v.audit$, 8, 1),
  1401.        substr(v.audit$, 9, 1) || '/' || substr(v.audit$, 10, 1),
  1402.        substr(v.audit$, 11, 1) || '/' || substr(v.audit$, 12, 1),
  1403.        substr(v.audit$, 13, 1) || '/' || substr(v.audit$, 14, 1),
  1404.        substr(v.audit$, 15, 1) || '/' || substr(v.audit$, 16, 1),
  1405.        substr(v.audit$, 17, 1) || '/' || substr(v.audit$, 18, 1),
  1406.        substr(v.audit$, 19, 1) || '/' || substr(v.audit$, 20, 1),
  1407.        substr(v.audit$, 21, 1) || '/' || substr(v.audit$, 22, 1)
  1408. from sys.obj$ o, sys.user$ u, sys.view$ v
  1409. where o.type = 4
  1410.   and o.owner# = u.user#
  1411.   and o.obj# = v.obj#
  1412. /
  1413. comment on table DBA_TAB_AUDIT_OPTS is
  1414. 'Auditing options for all tables and views'
  1415. /
  1416. comment on column DBA_TAB_AUDIT_OPTS.OWNER is
  1417. 'Owner of the object'
  1418. /
  1419. comment on column DBA_TAB_AUDIT_OPTS.TABLE_NAME is
  1420. 'Name of the object'
  1421. /
  1422. comment on column DBA_TAB_AUDIT_OPTS.TABLE_TYPE is
  1423. 'Type of the object'
  1424. /
  1425. comment on column DBA_TAB_AUDIT_OPTS.ALT is
  1426. 'Auditing ALTER WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1427. /
  1428. comment on column DBA_TAB_AUDIT_OPTS.AUD is
  1429. 'Auditing AUDIT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1430. /
  1431. comment on column DBA_TAB_AUDIT_OPTS.COM is
  1432. 'Auditing COMMENT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1433. /
  1434. comment on column DBA_TAB_AUDIT_OPTS.DEL is
  1435. 'Auditing DELETE WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1436. /
  1437. comment on column DBA_TAB_AUDIT_OPTS.GRA is
  1438. 'Auditing GRANT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1439. /
  1440. comment on column DBA_TAB_AUDIT_OPTS.IND is
  1441. 'Auditing INDEX WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1442. /
  1443. comment on column DBA_TAB_AUDIT_OPTS.INS is
  1444. 'Auditing INSERT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1445. /
  1446. comment on column DBA_TAB_AUDIT_OPTS.LOC is
  1447. 'Auditing LOCK WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1448. /
  1449. comment on column DBA_TAB_AUDIT_OPTS.REN is
  1450. 'Auditing RENAME WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1451. /
  1452. comment on column DBA_TAB_AUDIT_OPTS.SEL is
  1453. 'Auditing SELECT WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1454. /
  1455. comment on column DBA_TAB_AUDIT_OPTS.UPD is
  1456. 'Auditing UPDATE WHENEVER SUCCESSFUL / UNSUCCESSFUL'
  1457. /
  1458.